package com.game.enums;

/**
 * 牌型枚举，按照牌型从小到大排序
 * 与前端保持一致
 */
public enum HandType {
    HIGH_CARD(0),
    PAIR(1),
    TWO_PAIR(2),
    THREE_OF_A_KIND(3),
    STRAIGHT(4),
    FLUSH(5),
    FULL_HOUSE(6),
    FOUR_OF_A_KIND(7),
    STRAIGHT_FLUSH(8),
    ROYAL_FLUSH(9);

    private final int value;

    HandType(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }
    
    @Override
    public String toString() {
        switch (this) {
            case HIGH_CARD: return "高牌";
            case PAIR: return "一对";
            case TWO_PAIR: return "两对";
            case THREE_OF_A_KIND: return "三条";
            case STRAIGHT: return "顺子";
            case FLUSH: return "同花";
            case FULL_HOUSE: return "葫芦";
            case FOUR_OF_A_KIND: return "四条";
            case STRAIGHT_FLUSH: return "同花顺";
            case ROYAL_FLUSH: return "皇家同花顺";
            default: return "未知";
        }
    }
} 